from sys import exit

def gold_room():
    print("This room is full of gold./n How much do you take?")

    choice = input("> ")
    if "0" in choice or "1" in choice:
        how_much = int(choice)
    else:
        dead("Man,learn to type a number.")

    if how_much < 50:
        print("Nice,you're not greedy,you win!")
        exit(0)
    else:
        dead("You greedy bastard!")


def bear_room():
    print("There is a bear here.")
    print("Bear bunch honey.")
    print("Fat bear another door")
    print("How are you going?")
    bear_moved = False

    while True:
        choice = input("> ")

        if choice == "take honey":
            dead("Bear slaps your face.")
        elif choice == "taunt bear" and not bear_moved:
            print("Bear moved.")
            print("You can go now.")
            bear_moved = True
        elif choice == "taunt bear" and bear_moved:
            dead("Bear chews your leg.")
        elif choice == "open door" and bear_moved:
            gold_room()
        else:
            print("I got no idea what the means.")


def cthulhu_room():
    print("You see the evil.")
    print("You go insane.")
    print("Do you flee your life or eat your head?")

    choice = input("> ")

    if "flee" in choice:
        start()
    elif "head" in choice:
        dead("That was tasty!")
    else:
        cthulhu_room()


def dead(why):
    print(why,"You dead!")
    exit(0)

def start():
    print("You are in a dark room.")
    print("There is a door to your right and left.")
    print("Which one?")

    choice = input("> ")

    if choice == "left":
        bear_room()
    elif choice == "right":
        cthulhu_room()
    else:
        dead("You stumble around the room.")
	

start()